home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / pctj8404.arc / SEARCH4.BAS < prev    next >
BASIC Source File  |  1986-09-14  |  512b  |  20 lines

  1. '$$$$$$$$$$$$$$ 
  2. 'Subroutine 
  3. '$$$$$$$$$$$$$$ 
  4. '    This is the assembly language binary search subroutine. 
  5. '    Input is the table in which to look up (ITABLE), 
  6. '    the number of entries in the table (NTABLE), and 
  7. '    the number whose index is to be found (JKEY).  
  8. '    Output is the index (INDX) such that  
  9. '    ITABLE(INDX) = JKEY 
  10. '    ASSEMBLY LANGUAGE BINARY SEARCH 
  11. 8000 rem Start. 
  12.      call binsearch (ITABLE(1), NTABLE, JKEY, INDX) 
  13.      return 
  14.